
<div class="row">

	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">订单详情</div>
			<div class="panel-body">
				<div class="col-sm-4">
					<p><span>订单号：</span><strong>{$row.order_sn}</strong> </p>
					<p><span>订单来源：</span><strong>{$row.platform_text}</strong> </p>
					<p><span>下单时间：</span><strong>{$row.createtime|datetime}</strong> </p>
					{if($row.status > 0)}
					<p><span>付款方式：</span><strong>{$row.pay_type_text}</strong> </p>
					<p><span>交易流水号：</span><strong>{$row.transaction_id}</strong> </p>
					{/if}
				</div>

				<div class="col-sm-4" style="border-left: solid 1px #e6e6e6;">
					<p><span>买家：</span><strong>{$row.user.nickname}</strong> </p>
					<p><span>配送方式：</span><strong>{$row.delivery_type_text}</strong> </p>
					<p><span>收货人：</span><strong>{$row.consignee}</strong> </p>
					<p><span>联系电话：</span><strong>{$row.phone}</strong> </p>
					<p><span>收货地址：</span><strong>{$row.city}-{$row.address}</strong> </p>
				</div>
			</div>
		</div>
	</div>
	
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">订单状态</div>
			<div class="panel-body">
				<div class="col-sm-6">
					<div>
						<span>订单状态：</span><strong>{$row.status_text}</strong>
						{if($row.status == 1)}
						<a style="margin-left:20px;padding: 5px 15px;" href="javascript:;" class="delivery btn btn-info" data-id="{$row.id}"><i class="fa fa-rocket"></i> 发货</a> 
						{/if}

						{if($row.status == 2)}
							<a href="javascript:;" style="margin-left:20px;padding: 5px 15px;" class="take-delivery btn btn-info" data-id="{$row.id}"><i class="fa fa-truck"></i> 确认收货</a> 
						{/if}
					</div>
				</div>
				
			</div>
		</div>
	</div>

	{if($row.status > 1)}
		<div class="col-md-12">
			<div class="panel panel-default">
				<div class="panel-heading">物流信息</div>
				<div class="panel-body">
					<div class="col-sm-8">
						<p><span>发货时间：</span><strong>{$row.order_sn}</strong> </p>
						<p><span>物流公司：</span><strong>{$row.delivery_company}</strong> </p>
						<p><span>运单号：</span><strong>{$row.delivery_no}</strong> </p>
						<p>
							<a href="javascript:;" style="padding: 5px 15px;" class="logistics btn btn-info" data-id="{$row.id}"><i class="fa fa-truck"></i> 物流查询</a> 
						</p>
						<div id="logisticsInfo"></div>
					</div>
				</div>
			</div>
		</div>
	{/if}

	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">商品信息</div>
			<div class="panel-body">
				<table class="table table-bordered">
					<thead>
						<tr>
							<th class="text-center">
								<div class="th-inner">主图</div>
							</th>
							<th class="text-center">
								<div class="th-inner">商品名称</div>
							</th>
							<th class="text-center">
								<div class="th-inner">购买规格</div>
							</th>
							<th class="text-center">
								<div class="th-inner">数量</div>
							</th>
							<th class="text-center">
								<div class="th-inner">单价</div>
							</th>
							<th class="text-center">
								<div class="th-inner">总价</div>
							</th>
						</tr>
					</thead>
					<tbody>
						{volist name="row.item" id="vo"}
						<tr>
							<td class="text-center"><img class="img-sm img-center" src="{$vo.goods_image|cdnurl|htmlentities}"></td>
							<td class="text-center">{$vo.goods_title}</td>
							<td class="text-center">{$vo.goods_sku_text}</td>
							<td class="text-center">{$vo.buy_num}</td>
							<td class="text-center">{$vo.goods_price}</td>
							<td class="text-center">{$vo.buy_num * $vo.goods_price}</td>
						</tr>
						{/volist}
					</tbody>
					<tfoot>
						<tr>
							<th colspan="10" style="text-align: right;">
								<span class="ordertext" style="margin-right:100px;">商品总价：<samp class="text-red">￥{$row.goods_amount}</samp></span>
								<span class="ordertext" style="margin-right:100px;">应付金额：<samp class="text-red">￥{$row.total_fee}</samp></span>
								<span class="ordertext" style="margin-right: 15px;">实付金额：<samp class="text-red">￥{$row.pay_fee}</samp></span>
							</th>
						</tr>
					</tfoot>
				</table>
			</div>
		</div>
	</div>
</div>

<div class="hide layer-footer">
	<label class="control-label col-xs-12 col-sm-2"></label>
	<div class="col-xs-12 col-sm-8">
		<button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
	</div>
</div>
